Optimal. Leaf size=18 \[ -b x+\frac {(a+b) \tan (e+f x)}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 18, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3270, 396, 209}
\begin {gather*} \frac {(a+b) \tan (e+f x)}{f}-b x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 396
Rule 3270
Rubi steps
\begin {align*} \int \sec ^2(e+f x) \left (a+b \sin ^2(e+f x)\right ) \, dx &=\frac {\text {Subst}\left (\int \frac {a+(a+b) x^2}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a+b) \tan (e+f x)}{f}-\frac {b \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-b x+\frac {(a+b) \tan (e+f x)}{f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 36, normalized size = 2.00 \begin {gather*} -\frac {b \tan ^{-1}(\tan (e+f x))}{f}+\frac {a \tan (e+f x)}{f}+\frac {b \tan (e+f x)}{f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.27, size = 30, normalized size = 1.67
method | result | size |
derivativedivides | \(\frac {\tan \left (f x +e \right ) a +b \left (\tan \left (f x +e \right )-f x -e \right )}{f}\) | \(30\) |
default | \(\frac {\tan \left (f x +e \right ) a +b \left (\tan \left (f x +e \right )-f x -e \right )}{f}\) | \(30\) |
risch | \(-b x +\frac {2 i a}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}+\frac {2 i b}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}\) | \(46\) |
norman | \(\frac {b x +b x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )-b x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )-b x \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )-\frac {2 \left (a +b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f}-\frac {4 \left (a +b \right ) \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}-\frac {2 \left (a +b \right ) \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}}{\left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )-1\right ) \left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{2}}\) | \(135\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 33, normalized size = 1.83 \begin {gather*} -\frac {{\left (f x + e - \tan \left (f x + e\right )\right )} b - a \tan \left (f x + e\right )}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 35, normalized size = 1.94 \begin {gather*} -\frac {b f x \cos \left (f x + e\right ) - {\left (a + b\right )} \sin \left (f x + e\right )}{f \cos \left (f x + e\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sin ^{2}{\left (e + f x \right )}\right ) \sec ^{2}{\left (e + f x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 49 vs.
\(2 (19) = 38\).
time = 0.45, size = 49, normalized size = 2.72 \begin {gather*} -\frac {{\left (f x - \pi \left \lfloor \frac {f x + e}{\pi } + \frac {1}{2} \right \rfloor + e - \tan \left (f x + e\right )\right )} b - a \tan \left (f x + e\right )}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 13.64, size = 26, normalized size = 1.44 \begin {gather*} \frac {a\,\mathrm {tan}\left (e+f\,x\right )+b\,\mathrm {tan}\left (e+f\,x\right )-b\,f\,x}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________